import * as React from 'react';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { add } from './actions';

interface IProps {}

const Comp: React.FC<IProps> = (props) => {
  return <div>11</div>;
};

const mapStateToProps = (state: any) => {
  console.log('state', state);
  return {
    number: state,
  };
};

const mapDispatchToProps = (dispatch: Dispatch) => {
  return {
    add: () => dispatch(add()),
  };
};

export default connect(mapStateToProps, mapDispatchToProps)(Comp);
